Future functionality in ShellGlobal needs access to the GjsContext.
https://bugzilla.gnome.org/show_bug.cgi?id=599561
#include "display.h"
-#include "shell-global.h"
+#include "shell-global-private.h"
#include "shell-wm.h"
static void gnome_shell_plugin_constructed (GObject *object);
shell_plugin->gjs_context = gjs_context_new_with_search_path(search_path);
g_strfreev(search_path);
+ _shell_global_set_gjs_context (shell_global_get (), shell_plugin->gjs_context);
+
if (!gjs_context_eval (shell_plugin->gjs_context,
"const Main = imports.ui.main; Main.start();",
-1,
--- /dev/null
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#ifndef __SHELL_GLOBAL_PRIVATE_H__
+#define __SHELL_GLOBAL_PRIVATE_H__
+
+#include "shell-global.h"
+
+#include <gjs/gjs.h>
+
+void _shell_global_set_gjs_context (ShellGlobal *global,
+ GjsContext *context);
+
+#endif /* __SHELL_GLOBAL_PRIVATE_H__ */
#include <glib/gi18n-lib.h>
#include <math.h>
#include <X11/extensions/Xfixes.h>
+#include <gjs/gjs.h>
#define SHELL_DBUS_SERVICE "org.gnome.Shell"
ShellStageInputMode input_mode;
XserverRegion input_region;
-
+
+ GjsContext *js_context;
MutterPlugin *plugin;
ShellWM *wm;
const char *datadir;
global->wm = shell_wm_new (plugin);
}
+void
+_shell_global_set_gjs_context (ShellGlobal *global,
+ GjsContext *context)
+{
+ global->js_context = context;
+}
+
/**
* shell_global_begin_modal:
* @global: a #ShellGlobal